<?php

/**
 *      woo.vn - mr.Trieu
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: ajax.php 15:52:00 - 02-11-2011
 */

define('APPTYPEID', 37);
define('CURSCRIPT', 'ajax');

require_once './source/class/class_core.php';
require_once './source/function/function_home.php';

$discuz = & discuz_core::instance();

$cachelist = array('');
$discuz->cachelist = $cachelist;
$discuz->init();

$uid = empty($_GET['uid']) ? 0 : intval($_GET['uid']);

if($_GET['username']){
	$member = DB::fetch_first("SELECT uid
							   FROM " . DB::table('common_member') . "
							   WHERE username='$_GET[username]'
							   LIMIT 1");
	if(empty($member)){
		showmessage('space_does_not_exist');
	}
	$uid = $member['uid'];
}

if(empty($uid))
	$uid = $_G['uid'];

$mod = getgpc('mod');
if(!in_array($mod, array('feed', 'shop', 'auction'))) {
	$mod = 'feed';
}

define('CURMODULE', $mod);

require_once libfile('ajax/'.$mod, 'module');